1 Transects

Plant Flowers Date lon lat ele Month Year julian
Glossoloma oblongicalyx 4 2015-10-19 -78.59093 0.130838 2270 October 2015 292
Gasteranthus quitensis 2 2016-10-17 -78.59770 0.120070 1940 October 2016 291
Kohleria affinis 1 2016-12-13 -78.59534 0.126746 2110 December 2016 348
Columnea ciliata 3 2014-02-27 -78.59934 0.116682 1960 February 2014 58
Columnea medicinalis 1 2014-04-23 -78.59372 0.128700 2130 April 2014 113
Drymonia teuscheri 3 2016-07-28 -78.59245 0.129393 2200 July 2016 210

2 Interactions

3 Phylogeny

4 Traits

Plant Flowers Date lon lat ele Month Year julian
Glossoloma oblongicalyx 4 2015-10-19 -78.59093 0.130838 2270 October 2015 292
Gasteranthus quitensis 2 2016-10-17 -78.59770 0.120070 1940 October 2016 291
Kohleria affinis 1 2016-12-13 -78.59534 0.126746 2110 December 2016 348
Columnea ciliata 3 2014-02-27 -78.59934 0.116682 1960 February 2014 58
Columnea medicinalis 1 2014-04-23 -78.59372 0.128700 2130 April 2014 113
Drymonia teuscheri 3 2016-07-28 -78.59245 0.129393 2200 July 2016 210

4.0.1 Total Flowers

4.1 Peak date

As range

4.2 Infer absences

4.3 Species elevation ranges

4.4 Data Matrix

4.5 Species by transect matrix

5 Count model of species phenology

## sink("model/threshold_baseline.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
## 
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] 
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[PredPlant[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
## 
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3528
##    Total graph size: 17668
## 
## Initializing model

6 Get Chains

6.0.1 Evaluate convergence

6.0.2 Posterior estimates

7 Phylogeny

7.1 Attraction

## sink("model/threshold_attraction.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
## 
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=inverse(vCov*gamma)
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma ~ dunif(0,10)
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(0,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3602
##    Total graph size: 30651
## 
## Initializing model

8 Get Chains

8.0.1 Evaluate convergence

8.0.2 Posterior estimates

Mean phylogenetic covariance

8.1 Decay in phylogenetic attraction

8.2 Repulsion

## sink("model/threshold_repulsion.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
##     
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=vCov*gamma
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma ~ dunif(0,10)
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(1,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3602
##    Total graph size: 30650
## 
## Initializing model

9 Get Chains

9.0.1 Evaluate convergence

9.0.2 Posterior estimates

Mean phylogenetic covariance martix

9.1 Decay in phylogenetic repulsion

10 Traits

10.1 Trait Attraction

## sink("model/threshold_attraction.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
## 
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=inverse(vCov*gamma)
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma ~ dunif(0,10)
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(0,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3602
##    Total graph size: 30807
## 
## Initializing model

11 Get Chains

11.0.1 Evaluate convergence

11.0.2 Posterior estimates

11.1 Decay in trait attraction

11.2 Repulsion

## sink("model/threshold_repulsion.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
##     
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=vCov*gamma
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma ~ dunif(0,10)
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(1,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3602
##    Total graph size: 30806
## 
## Initializing model

12 Get Chains

12.0.1 Evaluate convergence

12.0.2 Posterior estimates

12.1 Decay in trait repulsion

13 Interaction

13.1 Attraction

## sink("model/threshold_repulsion.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
##     
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=vCov*gamma
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma ~ dunif(0,10)
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(1,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3602
##    Total graph size: 30806
## 
## Initializing model

13.1.1 Evaluate convergence

13.1.2 Posterior estimates

Mean interaction covariance

13.2 Decay in interaction attraction

13.3 Repulsion

## sink("model/threshold_repulsion.jags")
## cat("
##     model {
##     
##     for (x in 1:Nobs){
##     
##     #Observation of a flowering plant
##     Y[x] ~ dbern(p[x])
##     logit(p[x]) <- alpha[Plant[x]] + e[Plant[x],Site[x],Month[x]]
##     
##     #Residuals
##     discrepancy[x] <- abs(Y[x] - p[x])
##     
##     #Assess Model Fit
##     Ynew[x] ~ dbern(p[x])
##     discrepancy.new[x]<-abs(Ynew[x] - p[x])
##     }
##     
##     
##     #Sum discrepancy
##     fit<-sum(discrepancy)/Nobs
##     fitnew<-sum(discrepancy.new)/Nobs
##     
##     #Prediction
##     
##     for(x in 1:Npreds){
##     #predict value
##     
##     #Observation - probability of flowering
##     prediction[x] ~ dbern(p_new[x])
##     logit(p_new[x])<-alpha[NewPlant[x]] + e[NewPlant[x],NewSite[x],NewMonth[x]]
##     
##     #predictive error
##     pred_error[x] <- abs(Ypred[x] - prediction[x])
##     }
##     
##     
##     #Predictive Error
##     fitpred<-sum(pred_error)/Npreds
##     
##     #########################
##     #autocorrelation in error
##     #########################
##     
##     #For each of observation
##     for(x in 1:Sites){
##     for(y in 1:Months){
##     e[1:Plants,x,y] ~ dmnorm(zeros,tauC[,])
##     }
##     }
##     
##     
##     ##covariance among similiar species
##     for(i in 1:Plants){
##     for(j in 1:Plants){
##     C[i,j] = exp(-lambda_cov * D[i,j])
##     }
##     }
##     
##     ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
##     vCov = omega*C[,] + (1-omega) * I
##     tauC=vCov*gamma
##     
##     #Priors
##     
##     #Species level priors
##     
##     for (j in 1:Plants){
##     
##     #Intercept
##     #Intercept flowering count
##     alpha[j] ~ dnorm(0,0.386)
##     
##     } 
##     
##     #Autocorrelation priors
##     gamma ~ dunif(0,10)
##     
##     #Strength of covariance decay
##     lambda_cov ~ dunif(1,5)
##     omega = 1
##     }
##     ",fill=TRUE)
## 
## sink()
## Compiling model graph
##    Resolving undeclared variables
##    Allocating nodes
## Graph information:
##    Observed stochastic nodes: 2800
##    Unobserved stochastic nodes: 3602
##    Total graph size: 30806
## 
## Initializing model

14 Get Chains

14.0.1 Evaluate convergence

14.0.2 Posterior estimates

Mean interaction covariance martix

14.1 Decay in interaction repulsion

15 Model Comparison

15.1 Alpha

The probability of occurrence.

15.2 E: The effect of autocorrelation on mean flowering intensity

15.3 Omega: The magnitude of the effect of autocorrelation on mean flowering occurrence

15.4 Gamma: The variance of the effect of autocorrelation on mean flowering occurrence

15.5 Decay in autocorrelation effect

16 Model Fit

16.1 Bayesian pvalue

## # A tibble: 6 x 2
##   Model                       p
##   <chr>                   <dbl>
## 1 interaction_attraction  0.724
## 2 interaction_repulsion   0.746
## 3 phylogenetic_attraction 0.85 
## 4 phylogenetic_repulsion  0.698
## 5 trait_attraction        0.836
## 6 trait_repulsion         0.778

16.2 Overall

Model mean lower upper
trait_attraction 0.2023084 0.1949602 0.2094650
phylogenetic_attraction 0.2014100 0.1945216 0.2095568
trait_repulsion 0.1923697 0.1805013 0.2027663
interaction_repulsion 0.1863426 0.1764860 0.1967379
interaction_attraction 0.1847405 0.1749398 0.1941953
phylogenetic_repulsion 0.1817221 0.1726394 0.1908291

16.2.1 Without baseline

16.3 By Species

Without baseline

Zoom in

17 Prediction

17.0.1 Tables

Model mean lower upper
baseline 0.3620644 0.3333333 0.3921569
phylogenetic_attraction 0.2605014 0.2394958 0.2829132
trait_attraction 0.2578627 0.2352241 0.2815126
trait_repulsion 0.2526078 0.2296919 0.2745098
interaction_repulsion 0.2480308 0.2268908 0.2717087
interaction_attraction 0.2474034 0.2254902 0.2689076
phylogenetic_repulsion 0.2435154 0.2212885 0.2633053